package com.androider.timememory.activity;

import com.androider.timememory.R;
import com.androider.timememory.view.ScrollLayout;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;

public class Guide extends Activity {
	private ScrollLayout scrollView;
	private ImageView img1;
	private ImageView img2;
	private ImageView img3;
	private ImageView img4;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.guide_layout);

		scrollView = (ScrollLayout) findViewById(R.id.guide_scrolllayout);

		try {
			img1 = new ImageView(this);
			img1.setImageResource(R.drawable.guide_1);
			scrollView.addView(img1);
		} catch (OutOfMemoryError e) {
			e.printStackTrace();
		}

		try {
			img2 = new ImageView(this);
			img2.setImageResource(R.drawable.guide_2);
			scrollView.addView(img2);
		} catch (OutOfMemoryError e) {
			e.printStackTrace();
		}

		try {
			img3 = new ImageView(this);
			img3.setImageResource(R.drawable.guide_3);
			scrollView.addView(img3);
		} catch (OutOfMemoryError e) {
			e.printStackTrace();
		}

		try {
			img4 = new ImageView(this);
			img4.setImageResource(R.drawable.guide_4);
			scrollView.addView(img4);
		} catch (OutOfMemoryError e) {
			e.printStackTrace();
		}
	}

	@Override
	protected void onDestroy() {
		// TODO Auto-generated method stub
		super.onDestroy();
		scrollView.removeAllViews();
		img1 = null;
		img2 = null;
		img3 = null;
		img4 = null;
	}
	
	
}
